home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / sun / volume2 / calentool / patch5a next >
Encoding:
Internet Message Format  |  1990-02-04  |  54.0 KB

  1. Subject:  v02i003:  calentool - patch level 5, Part 1/4
  2. Newsgroups: comp.sources.sun
  3. Approved: mcgrew@aramis.rutgers.edu
  4.  
  5. Submitted-by: Bill Randle <billr@saab.cna.tek.com>
  6. Posting-number: Volume 2, Issue 3
  7. Archive-name: calentool/patch5a
  8.  
  9.  
  10. [This is patch #5 for calentool, the day/week/month/year at-a-glance
  11.  hackers almanac. This patch fixes several bugs and introduces several
  12.  new features that have been requested. Amoung these are: 12/24 hour
  13.  time display, European week formats (Mon-Sun), repeating appointments
  14.  with a fixed duration, nested include files, relative dates for -d
  15.  option and a new calencheck program. See the file 'PATCHLOG' for
  16.  full details.
  17.  A complete, patched source is available via anon uucp from host 'saab'
  18.  (send mail for uucp info) and (eventually) from the sun-source archive
  19.  on titan.rice.edu.
  20.  Bug reports and feature suggestions are always welcome.
  21.         Bill Randle
  22.         billr@saab.CNA.TEK.COM
  23. ]
  24.  
  25. #! /bin/sh
  26. # This is a shell archive.  Remove anything before this line, then unpack
  27. # it by saving it into a file and typing "sh file".  To overwrite existing
  28. # files, type "sh file -c".  You can also feed this as standard input via
  29. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  30. # will see the following message at the end:
  31. #        "End of archive 1 (of 4)."
  32. # Contents:  calencheck.1 expire.c patches05a
  33. # Wrapped by billr@saab on Tue Dec 19 12:28:30 1989
  34. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  35. if test -f 'calencheck.1' -a "${1}" != "-c" ; then 
  36.   echo shar: Will not clobber existing file \"'calencheck.1'\"
  37. else
  38. echo shar: Extracting \"'calencheck.1'\" \(1124 characters\)
  39. sed "s/^X//" >'calencheck.1' <<'END_OF_FILE'
  40. X.\" $Header: calencheck.1,v 2.1 89/12/15 17:04:56 billr Exp $
  41. X.\"
  42. X.TH CALENCHECK 1 "14 December 1989"
  43. X.SH NAME
  44. Xcalencheck - check for pending appointments
  45. X.SH SYNOPSIS
  46. X.B calencheck
  47. X[
  48. X.B \-f
  49. X.I apptsfile
  50. X]
  51. X.SH DESCRIPTION
  52. X.I Calencheck
  53. Xis a companion program for
  54. X.IR calentool (1L).
  55. X.I Calencheck
  56. Xreads the
  57. X.I calentool
  58. X.B .appointments
  59. Xfile and sends a message to the console approximately ten minutes
  60. Xbefore a scheduled appointment is to start.  Its operation is
  61. Xthe same as invoking
  62. X.I calentool
  63. Xwith the
  64. X.B \-b
  65. Xoption, with the exception that there is no icon to change.
  66. X.LP
  67. XThis program is especially useful for Sun systems with limited
  68. Xmemory or swap space that can not afford to keep
  69. X.I calentool
  70. Xrunning continously.
  71. XIt may also be useful if the user is not working at his/her console,
  72. Xas it does not require the window system to work.
  73. X.LP
  74. XTo enter or edit appointments the
  75. X.I calentool
  76. Xprogram must still be used.
  77. X.SH OPTIONS
  78. X.TP 15
  79. X.BI \-f \ apptsfile
  80. XUse
  81. X.I apptsfile
  82. Xas the appointments file, rather than the default.
  83. X.SH "SEE ALSO"
  84. Xcalentool(1L)
  85. X.SH AUTHOR
  86. XBill Randle (Tektronix, Inc., billr@saab.CNA.TEK.COM)
  87. END_OF_FILE
  88. if test 1124 -ne `wc -c <'calencheck.1'`; then
  89.     echo shar: \"'calencheck.1'\" unpacked with wrong size!
  90. fi
  91. # end of 'calencheck.1'
  92. fi
  93. if test -f 'expire.c' -a "${1}" != "-c" ; then 
  94.   echo shar: Will not clobber existing file \"'expire.c'\"
  95. else
  96. echo shar: Extracting \"'expire.c'\" \(4867 characters\)
  97. sed "s/^X//" >'expire.c' <<'END_OF_FILE'
  98. X/*
  99. X * $Header: expire.c,v 2.1 89/12/15 17:04:54 billr Exp $
  100. X *
  101. X * expire.c
  102. X * expire outdated appts, i.e. remove them from the appts file, if they
  103. X * are older than <n> days.
  104. X *
  105. X * Copyright (C) 1989 Tektronix, Inc.
  106. X *    All Rights Reserved
  107. X * Permission is hereby granted to use and modify this code in source
  108. X * or binary form as long as it is not sold for profit and this copyright
  109. X * notice remains intact.
  110. X */
  111. X
  112. X#include <stdio.h>
  113. X#include <sys/time.h>
  114. X#include <sys/types.h>
  115. X#include <sys/stat.h>
  116. X#include <sys/errno.h>
  117. X#include "ct.h"
  118. X
  119. Xextern struct tm today, current;
  120. Xextern char apts_pathname[], tmpapts_pathname[];
  121. Xextern char inbuf[], apts_dir[];
  122. Xextern int save_old;
  123. Xextern int errno;
  124. Xextern double julian_day();
  125. Xextern double nth_mday_of_month();
  126. X
  127. X/*
  128. X * Scan appointments file for outdated appointments. If <save_old> is
  129. X * TRUE then save them to a special file of the form ".appointments.YY",
  130. X * where YY is the year of that appointment.  If <edays> is zero, then
  131. X * all other appointments are copied to the new appts file.  If <edays>
  132. X * > 0, then any appointments more than <edays> old are discarded.
  133. X * Setting <save_old> TRUE and <edays> to 0 gives the behavior described
  134. X * by the "-o" switch.
  135. X */
  136. Xexpire(edays)
  137. Xint edays;
  138. X{
  139. X    FILE *apts, *temp_apts, *fp;
  140. X    int read_stat;
  141. X    int runl, week;
  142. X    char save_file[128];
  143. X    struct appt_entry appt;
  144. X    struct stat sbuf;
  145. X
  146. X    /*
  147. X     * method: for each regular appt in the file (or limited
  148. X     * duration appt), compare the Julian date of that appt
  149. X     * and the Julian date of today, looking for a difference
  150. X     * greater than <edays>.
  151. X     */
  152. X    if ((apts = fopen(apts_pathname, "r")) == NULL)
  153. X        err_rpt("can't open appointments file", FATAL);
  154. X
  155. X    if ((temp_apts = fopen(tmpapts_pathname, "w")) == NULL)
  156. X        err_rpt("can't open temp file for writing", FATAL);
  157. X
  158. X    /*
  159. X     * now go thru the appointments file
  160. X     */
  161. X    while ((read_stat=get_aentry(apts, &appt, TRUE)) != EOF) {
  162. X        if (read_stat)
  163. X            continue;    /* read error (ignore) */
  164. X        if (appt.flags & A_COMMENT) {
  165. X            fputs(inbuf, temp_apts);
  166. X            continue;
  167. X        }
  168. X        current.tm_year = appt.year;
  169. X        current.tm_mon = appt.month;
  170. X        current.tm_mday = appt.day;
  171. X        if (appt.flags & ALL_YEARS)
  172. X            /* force this to be saved */
  173. X            current.tm_year = today.tm_year + 1;
  174. X        if (appt.flags & ALL_MONTHS)
  175. X            /* maybe saved, pick worse case */
  176. X            current.tm_mon = DEC;
  177. X        if (appt.flags & ALL_DAYS) {
  178. X            if (current.tm_year < today.tm_year ||
  179. X               (current.tm_year == today.tm_year &&
  180. X                current.tm_mon < today.tm_mon))
  181. X                /* maybe saved, pick worse case */
  182. X                current.tm_mday = monthlength(current.tm_mon);
  183. X        }
  184. X        if (appt.flags & EVERY_SOMEDAY) {
  185. X            if ((appt.repeat & ALL_WEEKS) == ALL_WEEKS || appt.repeat & LAST_WEEK ||
  186. X                appt.repeat & WEEK5)
  187. X                week = 5;
  188. X            else if (appt.repeat & WEEK4)
  189. X                week = 4;
  190. X            else if (appt.repeat & WEEK3)
  191. X                week = 3;
  192. X            else if (appt.repeat & WEEK2)
  193. X                week = 2;
  194. X            else if (appt.repeat & WEEK1)
  195. X                week = 1;
  196. X            current.tm_mday = (int)nth_mday_of_month(week, Pickday(appt.flags), current.tm_mon, current.tm_year+1900);
  197. X            if (current.tm_mday > monthlength(current.tm_mon))
  198. X                current.tm_mday = (int)nth_mday_of_month(week-1, Pickday(appt.flags), current.tm_mon, current.tm_year+1900);
  199. X            if (appt.flags & RUN) {
  200. X                current.tm_mday += appt.runlength;
  201. X                fix_current_day();
  202. X            }
  203. X        } else if (appt.flags & REPEAT) {
  204. X            if (appt.flags & RUN)
  205. X                runl = appt.runlength;
  206. X            else
  207. X                runl = 1;
  208. X            while (ymd_compare(current, today) < 0 && runl) {
  209. X                if (appt.flags & RUN)
  210. X                    --runl;
  211. X                if (runl) {
  212. X                    current.tm_mday += appt.repeat;
  213. X                    fix_current_day();
  214. X                }
  215. X            }
  216. X        }
  217. X        if (save_old && current.tm_year < today.tm_year) {
  218. X            /* prepend directory info */
  219. X            sprintf(save_file, "%s/.appointments.%02d",
  220. X                apts_dir, appt.year);
  221. X            if (stat(save_file, &sbuf) && errno == ENOENT) {
  222. X                /* new file*/
  223. X                if ((fp = fopen(save_file, "w")) == NULL)
  224. X                    err_rpt("can't open save file, bailing out", FATAL);
  225. X                fputs(HEADER, fp);
  226. X                fclose(fp);
  227. X            }
  228. X            if ((fp = fopen(save_file, "a+")) == NULL)
  229. X                err_rpt("can't open save file, bailing out", FATAL);
  230. X            else {
  231. X                if (put_aentry(fp, &appt))
  232. X                    err_rpt("write to save appt file failed, bailing out", FATAL);
  233. X                fclose(fp);
  234. X            }
  235. X        }
  236. X        current.tm_mday += edays;  /* offset by expire days */
  237. X        fix_current_day();
  238. X        if (edays == 0 ||
  239. X            julian_day((double)current.tm_mday, current.tm_mon, current.tm_year+1900) >=
  240. X            julian_day((double)today.tm_mday, today.tm_mon, today.tm_year+1900)) {
  241. X            if (put_aentry(temp_apts, &appt)) {
  242. X                /* write error */
  243. X                break;
  244. X            }
  245. X        }
  246. X        }
  247. X    if (ferror(temp_apts))
  248. X        err_rpt("write on temp file failed", FATAL);
  249. X    fclose(temp_apts);
  250. X        fclose(apts);
  251. X    /* don't rename zero length files */
  252. X    stat(tmpapts_pathname, &sbuf);
  253. X    if (sbuf.st_size == (off_t) 0)
  254. X        err_rpt("zero length temp file - not renamed", NON_FATAL);
  255. X    else
  256. X        xrename(tmpapts_pathname, apts_pathname);
  257. X}
  258. X
  259. END_OF_FILE
  260. if test 4867 -ne `wc -c <'expire.c'`; then
  261.     echo shar: \"'expire.c'\" unpacked with wrong size!
  262. fi
  263. # end of 'expire.c'
  264. fi
  265. if test -f 'patches05a' -a "${1}" != "-c" ; then 
  266.   echo shar: Will not clobber existing file \"'patches05a'\"
  267. else
  268. echo shar: Extracting \"'patches05a'\" \(44652 characters\)
  269. sed "s/^X//" >'patches05a' <<'END_OF_FILE'
  270. X*** moon.icon.orig    Fri Dec 15 17:19:43 1989
  271. X--- moon.icon    Fri Dec 15 17:05:01 1989
  272. X***************
  273. X*** 1,4 ****
  274. X--- 1,5 ----
  275. X  /* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
  276. X+  * $Header: moon.icon,v 2.1 89/12/15 17:04:59 billr Exp $
  277. X   */
  278. X      0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
  279. X      0xFFFF,0xFF00,0x00FF,0xFFFF,0xFFFF,0xF800,0x081F,0xFFFF,
  280. X*** /tmp/,RCSt1a16881    Fri Dec 15 17:21:59 1989
  281. X--- PATCHLOG    Fri Dec 15 17:13:47 1989
  282. X***************
  283. X*** 1,4
  284. X! # $Header: PATCHLOG,v 2.5 89/09/19 06:17:10 billr Exp $
  285. X  
  286. X  #$Log:    PATCHLOG,v $
  287. X  # Revision 2.5  89/09/19  06:17:10  billr
  288. X
  289. X--- 1,4 -----
  290. X! # $Header: PATCHLOG,v 2.6 89/12/15 17:13:23 billr Exp $
  291. X  
  292. X  #$Log:    PATCHLOG,v $
  293. X  # Revision 2.6  89/12/15  17:13:23  billr
  294. X***************
  295. X*** 1,6
  296. X  # $Header: PATCHLOG,v 2.5 89/09/19 06:17:10 billr Exp $
  297. X  
  298. X  #$Log:    PATCHLOG,v $
  299. X  # Revision 2.5  89/09/19  06:17:10  billr
  300. X  # Patchlevel 4 of calentool. Fixes the following bug reports:
  301. X  # 
  302. X
  303. X--- 1,58 -----
  304. X  # $Header: PATCHLOG,v 2.6 89/12/15 17:13:23 billr Exp $
  305. X  
  306. X  #$Log:    PATCHLOG,v $
  307. X+ # Revision 2.6  89/12/15  17:13:23  billr
  308. X+ # Patchlevel 5 of calentool fixes the following bugs and adds features:
  309. X+ # 
  310. X+ # ===========
  311. X+ # Bugs Fixed:
  312. X+ # ===========
  313. X+ # calentool -p -m misses warnings in advance if the warning and 
  314. X+ #     appointments are in different month.  <kayhan@eve.usc.edu>
  315. X+ # Fixed bug with day/week PostScript printouts [reported by several people]
  316. X+ # Fixed bug with "-m" option [reported by several people]
  317. X+ # Corrected date for Australia Day <ajc@philabs.philips.COM>
  318. X+ # Fixed -p/-P/-m options so nothing is printed (or mailed) if there are
  319. X+ #     no appointments for the day. <uunet.uu.net!xlab!milt!milt>, <brooks@ge-dab.crd.ge.COM>
  320. X+ # Fixed bug whereby entire calentool was being changed to black&white
  321. X+ #     after the Moon data frame was displayed.
  322. X+ # Fixed bug in calculation of Jewish passover (on which all the other
  323. X+ #     Jewish holidays are based) <smb@hector.att.COM>, <rjc@cs.brown.edu>
  324. X+ # Fixed bug that displayed previous days calendar if a day is selected from a 6 day week. <bob@omni.COM>
  325. X+ # Shortend length of an extra long entry in the dates/space file. <cdurst@aecmail.prime.com>
  326. X+ # Fixed bug in calculation of nth_day_of_month (shows up as putting election
  327. X+ #     day on the wrong week). <uunet.uu.net!formtek!pen>, <att.att.COM!cbosgd!smk>
  328. X+ # Fixed bug whereby deleted repeated appointments were not always recognized.
  329. X+ # Added #define for mail program with default set to "usr/ucb/mail". The
  330. X+ #     problem showed up when a user had /usr/5bin in his path before
  331. X+ #     /usr/ucb. <uunet.uu.net!cjsa!jeff>
  332. X+ # Fixed bug that caused calentool to dump core on notes sections with long messages.
  333. X+ # Added dates/space entry in Makefile.
  334. X+ # 
  335. X+ # =============
  336. X+ # New features:
  337. X+ # =============
  338. X+ # Modified parse_date to allow +nnn and -nnn syntax for dates relative to the
  339. X+ #     current date. <peter@hadrian.uwo.ca>
  340. X+ # 
  341. X+ # Add new #defines and switches for selected 12/24 time displays and either
  342. X+ #     Sunday-Saturday or Monday-Sunday weeks (for some Europeans). <hk@simulina.se>
  343. X+ # Cleaner opening windows. <cdurst@aecmail.prime.com>
  344. X+ # New -B option to beep AND open calentool window. <cdurst@aecmail.prime.com>
  345. X+ # Nested includes (to 4 levels) are now allowed. (Idea from <mdf0%shemesh@gte.COM>)
  346. X+ # Allow -p/-P[dw] options to work in conjunction with -m/-M so that a
  347. X+ #     weeks worth of appointments can be mailed.
  348. X+ # Added new expire option (-x) to expire (trash) all appointments older than
  349. X+ #     a specified number of days.
  350. X+ # The sense of the -w option was changed. In order to get the "Working!"
  351. X+ #     message, you now have to specify "-w".
  352. X+ # Changed M/D/Y dates to D/M/Y when European option (-E) selected.
  353. X+ # Optimized certain holiday calculations.
  354. X+ # New feature for appointments that repeat for a fixed interval of time
  355. X+ #       e.g. 12/26/89 for 5 days.
  356. X+ # Wrote new calencheck program for checking for pending appts without having
  357. X+ #     to run calentool.
  358. X+ #
  359. X  # Revision 2.5  89/09/19  06:17:10  billr
  360. X  # Patchlevel 4 of calentool. Fixes the following bug reports:
  361. X  # 
  362. X*** /tmp/,RCSt1a16886    Fri Dec 15 17:22:02 1989
  363. X--- Bugs    Fri Dec 15 17:16:39 1989
  364. X***************
  365. X*** 1,8
  366. X  These aren't major, but I haven't had time to track them down...
  367. X  
  368. X  1) The "Working!" message occasionally lingers on when it shouldn't.
  369. X!    If it bothers you, use the "-w" option to turn off the message
  370. X!    entirely.
  371. X  
  372. X  2) Arrow display messes up on rare occasions.  I haven't duplicated
  373. X     this often enough to track down.
  374. X
  375. X--- 1,7 -----
  376. X  These aren't major, but I haven't had time to track them down...
  377. X  
  378. X  1) The "Working!" message occasionally lingers on when it shouldn't.
  379. X!    If it bothers you, don't use this option (-w).
  380. X  
  381. X  The following bugs have been reported by various users, but I haven't
  382. X  been able to fix them, since I haven't been able to duplicate them
  383. X***************
  384. X*** 4,12
  385. X     If it bothers you, use the "-w" option to turn off the message
  386. X     entirely.
  387. X  
  388. X- 2) Arrow display messes up on rare occasions.  I haven't duplicated
  389. X-    this often enough to track down.
  390. X- 
  391. X  The following bugs have been reported by various users, but I haven't
  392. X  been able to fix them, since I haven't been able to duplicate them
  393. X  (usually due to hardware/os combinations I don't have access to).
  394. X
  395. X--- 3,8 -----
  396. X  1) The "Working!" message occasionally lingers on when it shouldn't.
  397. X     If it bothers you, don't use this option (-w).
  398. X  
  399. X  The following bugs have been reported by various users, but I haven't
  400. X  been able to fix them, since I haven't been able to duplicate them
  401. X  (usually due to hardware/os combinations I don't have access to).
  402. X***************
  403. X*** 12,18
  404. X  (usually due to hardware/os combinations I don't have access to).
  405. X  
  406. X  *Calentool dies (seg fault) after running overnight with lockscreen <mfeblowitz@ge.com>
  407. X- *Core dump when clicking MS-MIDDLE button on note section on 386i <jmc@ptsfa.pacbell.com>
  408. X  *Memory leakage <vicorp!sparky!scott@uunet.uu.net>
  409. X  *Popup error window only gets partially displayed (OS 4.0.3/Sun3) <rohit@sun.com>
  410. X  ?Deleting single occurrance of multiple meeting doesn't really delete it <ecm@aloft.uucp>
  411. X
  412. X--- 8,13 -----
  413. X  (usually due to hardware/os combinations I don't have access to).
  414. X  
  415. X  *Calentool dies (seg fault) after running overnight with lockscreen <mfeblowitz@ge.com>
  416. X  *Memory leakage <vicorp!sparky!scott@uunet.uu.net>
  417. X  *Popup error window only gets partially displayed (OS 4.0.3/Sun3) <rohit@sun.com>
  418. X  *Running calentool forces icon gravity change on 386i <lwv27%chemabs@cis.ohio-state.edu>
  419. X***************
  420. X*** 15,22
  421. X  *Core dump when clicking MS-MIDDLE button on note section on 386i <jmc@ptsfa.pacbell.com>
  422. X  *Memory leakage <vicorp!sparky!scott@uunet.uu.net>
  423. X  *Popup error window only gets partially displayed (OS 4.0.3/Sun3) <rohit@sun.com>
  424. X! ?Deleting single occurrance of multiple meeting doesn't really delete it <ecm@aloft.uucp>
  425. X! ?Running calentool forces icon gravity change on 386i <lwv27%chemabs@cis.ohio-state.edu>
  426. X  
  427. X  If you fix any of these, or spot other bugs, please let me know.
  428. X  
  429. X
  430. X--- 10,16 -----
  431. X  *Calentool dies (seg fault) after running overnight with lockscreen <mfeblowitz@ge.com>
  432. X  *Memory leakage <vicorp!sparky!scott@uunet.uu.net>
  433. X  *Popup error window only gets partially displayed (OS 4.0.3/Sun3) <rohit@sun.com>
  434. X! *Running calentool forces icon gravity change on 386i <lwv27%chemabs@cis.ohio-state.edu>
  435. X  
  436. X  If you fix any of these, or spot other bugs, please let me know.
  437. X  
  438. X***************
  439. X*** 23,26
  440. X          Bill Randle
  441. X          billr@saab.CNA.TEK.COM
  442. X          {most backbones}!tektronix!saab.CNA.TEK!billr
  443. X!         August 11, 1989
  444. X
  445. X--- 17,20 -----
  446. X          Bill Randle
  447. X          billr@saab.CNA.TEK.COM
  448. X          {most backbones}!tektronix!saab.CNA.TEK!billr
  449. X!         December 15, 1989
  450. X*** /tmp/,RCSt1a16891    Fri Dec 15 17:22:06 1989
  451. X--- INSTALL    Fri Dec 15 17:16:42 1989
  452. X***************
  453. X*** 1,4
  454. X! INSTALLATION NOTES FOR CALENTOOL - Version 2.1, April 1989
  455. X  
  456. X  1) Edit the file "ct.h" to tailor calentool to your site. The only things
  457. X     that should really need to be "tweeked" are the define statements for:
  458. X
  459. X--- 1,4 -----
  460. X! INSTALLATION NOTES FOR CALENTOOL - Version 2.1p5, December 1989
  461. X  
  462. X  1) Edit the file "ct.h" to tailor calentool to your site. The only things
  463. X     that should really need to be "tweeked" are the define statements for:
  464. X***************
  465. X*** 11,16
  466. X     START_YEAR (first year to appear in year menu)
  467. X     NR_YEARS (total number of years to appear in year menu)
  468. X     UPDATE_RATE (rate of clock updating)
  469. X  
  470. X     If you want to make a smaller version of calentool, without certain
  471. X     features, uncomment the #defines for one or more of the following
  472. X
  473. X--- 11,19 -----
  474. X     START_YEAR (first year to appear in year menu)
  475. X     NR_YEARS (total number of years to appear in year menu)
  476. X     UPDATE_RATE (rate of clock updating)
  477. X+    MAILPROG (mailer for -m option)
  478. X+    HOUR_24 (for 12 or 24 hour time formats)
  479. X+    MON_FIRST (for Sun-Sat or Mon-Sun week formats)
  480. X  
  481. X     If you want to make a smaller version of calentool, without certain
  482. X     features, uncomment the #defines for one or more of the following
  483. X***************
  484. X*** 58,61
  485. X  
  486. X      Bill Randle
  487. X      billr@saab.CNA.TEK.COM
  488. X!     May 9, 1989
  489. X
  490. X--- 61,64 -----
  491. X  
  492. X      Bill Randle
  493. X      billr@saab.CNA.TEK.COM
  494. X!     December 15, 1989
  495. X*** /tmp/,RCSt1a02742    Tue Dec 19 12:26:34 1989
  496. X--- Makefile    Tue Dec 19 12:26:06 1989
  497. X***************
  498. X*** 1,4
  499. X! # $Header: Makefile,v 2.2 89/07/19 20:32:48 billr Exp $
  500. X  #
  501. X  #DATELIB_DIR  Directory containing the Date Library
  502. X  #PRINT_CMD    Command to send postscript to appropriate printer
  503. X
  504. X--- 1,4 -----
  505. X! # $Header: Makefile,v 2.4 89/12/19 12:25:42 billr Exp $
  506. X  #
  507. X  #DATELIB_DIR  Directory containing the Date Library
  508. X  #PRINT_CMD    Command to send postscript to appropriate printer
  509. X***************
  510. X*** 8,13
  511. X  #START_YEAR   What is first year of calendar to display
  512. X  #NR_YEARS     How many years to display.
  513. X  #UPDATE_RATE  How often to perform updates (second or minute)?
  514. X  #APPT_CHECK_LIMIT What limits to check for appointments (see ct.h)
  515. X  #
  516. X  #NO_PRINTER   No printing is supported
  517. X
  518. X--- 8,16 -----
  519. X  #START_YEAR   What is first year of calendar to display
  520. X  #NR_YEARS     How many years to display.
  521. X  #UPDATE_RATE  How often to perform updates (second or minute)?
  522. X+ #MAILPROG     Mailer for -m option
  523. X+ #HOUR_24      For 12 or 24 hour time formats
  524. X+ #MON_FIRST    For Sun-Sat or Mon-Sun week formats
  525. X  #APPT_CHECK_LIMIT What limits to check for appointments (see ct.h)
  526. X  #
  527. X  #NO_PRINTER   No printing is supported
  528. X***************
  529. X*** 15,20
  530. X  #NO_HOLIDAYS  No holiday display is supported
  531. X  #NO_SUN_MOON  No sun and moon phase info is supported
  532. X  #
  533. X  #BINDIR       Where to install binaries
  534. X  #LIBDIR       Where to install date files and utility binaries
  535. X  #MANDIR       Where to install man pages
  536. X
  537. X--- 18,25 -----
  538. X  #NO_HOLIDAYS  No holiday display is supported
  539. X  #NO_SUN_MOON  No sun and moon phase info is supported
  540. X  #
  541. X+ #CALENCHECK   Ifdefs out parts of files for calencheck program
  542. X+ #
  543. X  #BINDIR       Where to install binaries
  544. X  #LIBDIR       Where to install date files and utility binaries
  545. X  #MANDIR       Where to install man pages
  546. X***************
  547. X*** 30,35
  548. X  CC = cc
  549. X  DEFINES=  #-DDATELIB_DIR=\"./dates\" -DSTART_HOUR=7 -DEND_HOUR=19 -DSTART_YEAR=88
  550. X  CFLAGS=    -g ${DEFINES}
  551. X  LIBS=    -lsuntool -lsunwindow -lpixrect -lm
  552. X  
  553. X  DATEFILES= dates/README dates/celtic dates/computing dates/events\
  554. X
  555. X--- 35,41 -----
  556. X  CC = cc
  557. X  DEFINES=  #-DDATELIB_DIR=\"./dates\" -DSTART_HOUR=7 -DEND_HOUR=19 -DSTART_YEAR=88
  558. X  CFLAGS=    -g ${DEFINES}
  559. X+ CC_CFLAGS = ${CFLAGS} -DCALENCHECK
  560. X  LIBS=    -lsuntool -lsunwindow -lpixrect -lm
  561. X  
  562. X  DATEFILES= dates/README dates/celtic dates/computing dates/events\
  563. X***************
  564. X*** 36,42
  565. X       dates/lives dates/lotr dates/nature dates/popcult\
  566. X       dates/usa_holiday dates/usa_other dates/usa_states dates/world\
  567. X       dates/gdead dates/space
  568. X! SRCS=    calentool.c datelib.o devent.c dpaint.c event.c holidays.c\
  569. X       init.c moon.c mpaint.c notify.c pcal.c ras2ps.c riseset.c tool.c utils.c\
  570. X       version.c wevent.c wpaint.c ypaint.c
  571. X  INCLUDES= ct.h event.h paint.h patchlevel.h riseset.h
  572. X
  573. X--- 42,48 -----
  574. X       dates/lives dates/lotr dates/nature dates/popcult\
  575. X       dates/usa_holiday dates/usa_other dates/usa_states dates/world\
  576. X       dates/gdead dates/space
  577. X! SRCS=    calentool.c datelib.o devent.c dpaint.c event.c expire.c holidays.c\
  578. X       init.c moon.c mpaint.c notify.c pcal.c ras2ps.c riseset.c tool.c utils.c\
  579. X       version.c wevent.c wpaint.c ypaint.c
  580. X  INCLUDES= ct.h event.h paint.h patchlevel.h riseset.h
  581. X***************
  582. X*** 40,47
  583. X       init.c moon.c mpaint.c notify.c pcal.c ras2ps.c riseset.c tool.c utils.c\
  584. X       version.c wevent.c wpaint.c ypaint.c
  585. X  INCLUDES= ct.h event.h paint.h patchlevel.h riseset.h
  586. X! OBJS=    calentool.o datelib.o devent.o dpaint.o event.o holidays.o\
  587. X!      init.o moon.o mpaint.o notify.o pcal.o ras2ps.o riseset.o tool.o utils.o\
  588. X       version.o wevent.o wpaint.o ypaint.o
  589. X  
  590. X  all: calentool conv_tools
  591. X
  592. X--- 46,53 -----
  593. X       init.c moon.c mpaint.c notify.c pcal.c ras2ps.c riseset.c tool.c utils.c\
  594. X       version.c wevent.c wpaint.c ypaint.c
  595. X  INCLUDES= ct.h event.h paint.h patchlevel.h riseset.h
  596. X! OBJS=    calentool.o ct_datelib.o devent.o ct_dpaint.o event.o expire.o holidays.o\
  597. X!      init.o moon.o mpaint.o notify.o pcal.o ras2ps.o riseset.o tool.o ct_utils.o\
  598. X       version.o wevent.o wpaint.o ypaint.o
  599. X  CC_OBJS = calencheck.o cc_datelib.o cc_dpaint.o cc_utils.o
  600. X  
  601. X***************
  602. X*** 43,48
  603. X  OBJS=    calentool.o datelib.o devent.o dpaint.o event.o holidays.o\
  604. X       init.o moon.o mpaint.o notify.o pcal.o ras2ps.o riseset.o tool.o utils.o\
  605. X       version.o wevent.o wpaint.o ypaint.o
  606. X  
  607. X  all: calentool conv_tools
  608. X  
  609. X
  610. X--- 49,55 -----
  611. X  OBJS=    calentool.o ct_datelib.o devent.o ct_dpaint.o event.o expire.o holidays.o\
  612. X       init.o moon.o mpaint.o notify.o pcal.o ras2ps.o riseset.o tool.o ct_utils.o\
  613. X       version.o wevent.o wpaint.o ypaint.o
  614. X+ CC_OBJS = calencheck.o cc_datelib.o cc_dpaint.o cc_utils.o
  615. X  
  616. X  all: calentool calencheck conv_tools
  617. X  
  618. X***************
  619. X*** 44,50
  620. X       init.o moon.o mpaint.o notify.o pcal.o ras2ps.o riseset.o tool.o utils.o\
  621. X       version.o wevent.o wpaint.o ypaint.o
  622. X  
  623. X! all: calentool conv_tools
  624. X  
  625. X  # the main program
  626. X  calentool: ${OBJS}
  627. X
  628. X--- 51,57 -----
  629. X       version.o wevent.o wpaint.o ypaint.o
  630. X  CC_OBJS = calencheck.o cc_datelib.o cc_dpaint.o cc_utils.o
  631. X  
  632. X! all: calentool calencheck conv_tools
  633. X  
  634. X  # the main program
  635. X  calentool: ${OBJS}
  636. X***************
  637. X*** 51,57
  638. X      ${CC} ${CFLAGS} -o calentool ${OBJS} ${LIBS}
  639. X  
  640. X  calentool.o: calentool.c ct.h std.icon rev.icon nap.icon
  641. X! datelib.o: datelib.c
  642. X  devent.o: devent.c ct.h event.h
  643. X  dpaint.o: dpaint.c ct.h paint.h riseset.h
  644. X  holidays.o: holidays.c
  645. X
  646. X--- 58,66 -----
  647. X      ${CC} ${CFLAGS} -o calentool ${OBJS} ${LIBS}
  648. X  
  649. X  calentool.o: calentool.c ct.h std.icon rev.icon nap.icon
  650. X! ct_datelib.o: datelib.c
  651. X!     ${CC} ${CFLAGS} -c datelib.c
  652. X!     mv datelib.o ct_datelib.o
  653. X  devent.o: devent.c ct.h event.h
  654. X  ct_dpaint.o: dpaint.c ct.h paint.h riseset.h
  655. X      ${CC} ${CFLAGS} -c dpaint.c
  656. X***************
  657. X*** 53,59
  658. X  calentool.o: calentool.c ct.h std.icon rev.icon nap.icon
  659. X  datelib.o: datelib.c
  660. X  devent.o: devent.c ct.h event.h
  661. X! dpaint.o: dpaint.c ct.h paint.h riseset.h
  662. X  holidays.o: holidays.c
  663. X  init.o: init.c ct.h
  664. X  moon.o: moon.c
  665. X
  666. X--- 62,71 -----
  667. X      ${CC} ${CFLAGS} -c datelib.c
  668. X      mv datelib.o ct_datelib.o
  669. X  devent.o: devent.c ct.h event.h
  670. X! ct_dpaint.o: dpaint.c ct.h paint.h riseset.h
  671. X!     ${CC} ${CFLAGS} -c dpaint.c
  672. X!     mv dpaint.o ct_dpaint.o
  673. X! expire.o: expire.c ct.h
  674. X  holidays.o: holidays.c
  675. X  init.o: init.c ct.h
  676. X  moon.o: moon.c
  677. X***************
  678. X*** 64,70
  679. X  ras2ps.o: ras2ps.c
  680. X  riseset.o: riseset.h
  681. X  tool.o: tool.c ct.h
  682. X! utils.o: utils.c ct.h
  683. X  version.o: version.c
  684. X  wevent.o: wevent.c ct.h event.h
  685. X  wpaint.o: wpaint.c ct.h paint.h
  686. X
  687. X--- 76,84 -----
  688. X  ras2ps.o: ras2ps.c
  689. X  riseset.o: riseset.h
  690. X  tool.o: tool.c ct.h
  691. X! ct_utils.o: utils.c ct.h
  692. X!     ${CC} ${CFLAGS} -c utils.c
  693. X!     mv utils.o ct_utils.o
  694. X  version.o: version.c
  695. X  wevent.o: wevent.c ct.h event.h
  696. X  wpaint.o: wpaint.c ct.h paint.h
  697. X***************
  698. X*** 70,75
  699. X  wpaint.o: wpaint.c ct.h paint.h
  700. X  ypaint.o: ypaint.c ct.h paint.h
  701. X  
  702. X  # conversion utilities
  703. X  conv_tools: cal2ct month2ct mt2ct
  704. X  
  705. X
  706. X--- 84,103 -----
  707. X  wpaint.o: wpaint.c ct.h paint.h
  708. X  ypaint.o: ypaint.c ct.h paint.h
  709. X  
  710. X+ # the calencheck program
  711. X+ calencheck: ${CC_OBJS}
  712. X+     ${CC} ${CC_CFLAGS} -o calencheck ${CC_OBJS} -lsunwindow -lm
  713. X+ 
  714. X+ cc_utils.o: utils.c ct.h
  715. X+     ${CC} ${CC_CFLAGS} -c utils.c
  716. X+     mv utils.o cc_utils.o
  717. X+ cc_datelib.o: datelib.c
  718. X+     ${CC} ${CC_CFLAGS} -c datelib.c
  719. X+     mv datelib.o cc_datelib.o
  720. X+ cc_dpaint.o: dpaint.c ct.h
  721. X+     ${CC} ${CC_CFLAGS} -c dpaint.c
  722. X+     mv dpaint.o cc_dpaint.o
  723. X+ 
  724. X  # conversion utilities
  725. X  conv_tools: cal2ct month2ct mt2ct
  726. X  
  727. X***************
  728. X*** 84,89
  729. X  
  730. X  install: all
  731. X      install -s calentool ${BINDIR}
  732. X      install -c -m 444 calentool.1 ${MANDIR}/calentool.${MANEXT}
  733. X      install -c -m 444 CalenTool.d ${DEFSDIR}/CalenTool.d
  734. X      -mkdir ${LIBDIR}
  735. X
  736. X--- 112,118 -----
  737. X  
  738. X  install: all
  739. X      install -s calentool ${BINDIR}
  740. X+     install -s calencheck ${BINDIR}
  741. X      install -c -m 444 calentool.1 ${MANDIR}/calentool.${MANEXT}
  742. X      install -c -m 444 calencheck.1 ${MANDIR}/calencheck.${MANEXT}
  743. X      install -c -m 444 CalenTool.d ${DEFSDIR}/CalenTool.d
  744. X***************
  745. X*** 85,90
  746. X  install: all
  747. X      install -s calentool ${BINDIR}
  748. X      install -c -m 444 calentool.1 ${MANDIR}/calentool.${MANEXT}
  749. X      install -c -m 444 CalenTool.d ${DEFSDIR}/CalenTool.d
  750. X      -mkdir ${LIBDIR}
  751. X      cp ${DATEFILES} ${LIBDIR}
  752. X
  753. X--- 114,120 -----
  754. X      install -s calentool ${BINDIR}
  755. X      install -s calencheck ${BINDIR}
  756. X      install -c -m 444 calentool.1 ${MANDIR}/calentool.${MANEXT}
  757. X+     install -c -m 444 calencheck.1 ${MANDIR}/calencheck.${MANEXT}
  758. X      install -c -m 444 CalenTool.d ${DEFSDIR}/CalenTool.d
  759. X      -mkdir ${LIBDIR}
  760. X      cp ${DATEFILES} ${LIBDIR}
  761. X***************
  762. X*** 103,109
  763. X      rm -f *.o *.BAK core *~ #*#
  764. X  
  765. X  veryclean:
  766. X!     rm -f calentool cal2ct month2ct mt2ct *.o *.BAK core *~ #*#
  767. X  
  768. X  # If you are using GNU make, the following statement will cause it to
  769. X  # ignore any (bogus) files named `clean', `all', etc.; if you are using
  770. X
  771. X--- 133,139 -----
  772. X      rm -f *.o *.BAK core *~ #*#
  773. X  
  774. X  veryclean:
  775. X!     rm -f calentool calencheck cal2ct month2ct mt2ct *.o *.BAK core *~ #*#
  776. X  
  777. X  # If you are using GNU make, the following statement will cause it to
  778. X  # ignore any (bogus) files named `clean', `all', etc.; if you are using
  779. X*** /tmp/,RCSt1a16901    Fri Dec 15 17:22:14 1989
  780. X--- ToDo    Fri Dec 15 17:16:50 1989
  781. X***************
  782. X*** 1,7
  783. X  Still to do someday...
  784. X  
  785. X  1) Convert display code and event handling, etc. to X11.  Using
  786. X!    View2 may be the way to do this.
  787. X  
  788. X  2) Add Lunar based (e.g. Chinese, Japanese) holidays.
  789. X  
  790. X
  791. X--- 1,7 -----
  792. X  Still to do someday...
  793. X  
  794. X  1) Convert display code and event handling, etc. to X11.  Using
  795. X!    XView may be the way to do this.
  796. X  
  797. X  2) Add Lunar based (e.g. Chinese, Japanese) holidays.
  798. X  
  799. X***************
  800. X*** 33,39
  801. X  =Want to come up in week display <bob@boulder.colorado.edu>
  802. X  =Want to order the notes (i.e. pick which is displayed first) <dna@emmy.umd.edu>
  803. X  =Want to see two days at a time <rohit@sun.com>
  804. X- =Want to set duration of an appointment (e.g. gone for 4 days) <jeremy@kheops.cmi.no>
  805. X  =Want to start arbitrary process at appt time <wyle@inf.ethz.ch>
  806. X  =Want week display to show current day at left, then next 5-7 days <bob@boulder.colorado.edu>
  807. X  =Want window to open when appt time approaches <rohit@sun.com>
  808. X
  809. X--- 33,38 -----
  810. X  =Want to come up in week display <bob@boulder.colorado.edu>
  811. X  =Want to order the notes (i.e. pick which is displayed first) <dna@emmy.umd.edu>
  812. X  =Want to see two days at a time <rohit@sun.com>
  813. X  =Want to start arbitrary process at appt time <wyle@inf.ethz.ch>
  814. X  =Want week display to show current day at left, then next 5-7 days <bob@boulder.colorado.edu>
  815. X  =Want jump scroll for long messages
  816. X***************
  817. X*** 36,39
  818. X  =Want to set duration of an appointment (e.g. gone for 4 days) <jeremy@kheops.cmi.no>
  819. X  =Want to start arbitrary process at appt time <wyle@inf.ethz.ch>
  820. X  =Want week display to show current day at left, then next 5-7 days <bob@boulder.colorado.edu>
  821. X! =Want window to open when appt time approaches <rohit@sun.com>
  822. X
  823. X--- 35,40 -----
  824. X  =Want to see two days at a time <rohit@sun.com>
  825. X  =Want to start arbitrary process at appt time <wyle@inf.ethz.ch>
  826. X  =Want week display to show current day at left, then next 5-7 days <bob@boulder.colorado.edu>
  827. X! =Want jump scroll for long messages
  828. X! =Want more features from 'sched', e.g. alarm clock, marked time events, display month current month icon <cdurst@aecmail.prime.com>
  829. X! =Want to be able to set all command line options from within the running tool.
  830. X*** /tmp/,RCSt1a16906    Fri Dec 15 17:22:19 1989
  831. X--- calentool.1    Fri Dec 15 17:16:57 1989
  832. X***************
  833. X*** 1,4
  834. X! .\" $Header: calentool.1,v 2.4 89/09/19 06:06:11 billr Exp $
  835. X  .\"
  836. X  .TH CALENTOOL 1 "14 September 1989"
  837. X  .ds Ps P\s-2OST\s+2S\s-2CRIPT\s+2
  838. X
  839. X--- 1,4 -----
  840. X! .\" $Header: calentool.1,v 2.5 89/12/15 17:16:51 billr Exp $
  841. X  .\"
  842. X  .TH CALENTOOL 1 "14 December 1989"
  843. X  .ds Ps P\s-2OST\s+2S\s-2CRIPT\s+2
  844. X***************
  845. X*** 1,6
  846. X  .\" $Header: calentool.1,v 2.4 89/09/19 06:06:11 billr Exp $
  847. X  .\"
  848. X! .TH CALENTOOL 1 "14 September 1989"
  849. X  .ds Ps P\s-2OST\s+2S\s-2CRIPT\s+2
  850. X  .SH NAME
  851. X  calentool - day/week/month/year-at-a-glance SunView tool (the Hacker's Almanac)
  852. X
  853. X--- 1,6 -----
  854. X  .\" $Header: calentool.1,v 2.5 89/12/15 17:16:51 billr Exp $
  855. X  .\"
  856. X! .TH CALENTOOL 1 "14 December 1989"
  857. X  .ds Ps P\s-2OST\s+2S\s-2CRIPT\s+2
  858. X  .SH NAME
  859. X  calentool - day/week/month/year-at-a-glance SunView tool (the Hacker's Almanac)
  860. X***************
  861. X*** 10,15
  862. X  .B \-b
  863. X  ]
  864. X  [
  865. X  .B \-d
  866. X  .I date
  867. X  ]
  868. X
  869. X--- 10,18 -----
  870. X  .B \-b
  871. X  ]
  872. X  [
  873. X+ .B \-B
  874. X+ ]
  875. X+ [
  876. X  .B \-d
  877. X  .I date
  878. X  ]
  879. X***************
  880. X*** 35,40
  881. X  .I userid
  882. X  ]
  883. X  [
  884. X  .B \-o
  885. X  ]
  886. X  [
  887. X
  888. X--- 38,47 -----
  889. X  .I userid
  890. X  ]
  891. X  [
  892. X+ .B \-M
  893. X+ .I userid
  894. X+ ]
  895. X+ [
  896. X  .B \-o
  897. X  ]
  898. X  [
  899. X***************
  900. X*** 67,72
  901. X  .B \-5
  902. X  ]
  903. X  [
  904. X  .B \-7
  905. X  ]
  906. X  [
  907. X
  908. X--- 74,83 -----
  909. X  .B \-5
  910. X  ]
  911. X  [
  912. X+ .B \-6
  913. X+ ]
  914. X+ [
  915. X+ [
  916. X  .B \-7
  917. X  ]
  918. X  [
  919. X***************
  920. X*** 70,76
  921. X  .B \-7
  922. X  ]
  923. X  [
  924. X! .I suntools options
  925. X  ]
  926. X  .SH DESCRIPTION
  927. X  .I Calentool
  928. X
  929. X--- 81,87 -----
  930. X  .B \-7
  931. X  ]
  932. X  [
  933. X! .B \-12
  934. X  ]
  935. X  [
  936. X  .B \-24
  937. X***************
  938. X*** 72,77
  939. X  [
  940. X  .I suntools options
  941. X  ]
  942. X  .SH DESCRIPTION
  943. X  .I Calentool
  944. X  is a day/week/month/year-at-a-glance tool.  It is a
  945. X
  946. X--- 83,104 -----
  947. X  [
  948. X  .B \-12
  949. X  ]
  950. X+ [
  951. X+ .B \-24
  952. X+ ]
  953. X+ [
  954. X+ .B \-e
  955. X+ ]
  956. X+ [
  957. X+ .B \-E
  958. X+ ]
  959. X+ [
  960. X+ .B \-x
  961. X+ .I int
  962. X+ ]
  963. X+ [
  964. X+ .I sunview options
  965. X+ ]
  966. X  .SH DESCRIPTION
  967. X  .I Calentool
  968. X  is a day/week/month/year-at-a-glance tool.  It is a
  969. X***************
  970. X*** 88,94
  971. X  .IR mail (1),
  972. X  and to examine colleagues appointment schedules.  Daily and weekly schedules
  973. X  can be sent to a \*(Ps printer.  Outdated appointments can be sent
  974. X! automatically to an archival file.  An extensive  set of files containing
  975. X  commemorative dates is included, as well as a library of routines which
  976. X  computes the dates of various holidays which do not fall on fixed days
  977. X  of the Gregorian calendar (including religious holidays and astronomical
  978. X
  979. X--- 115,121 -----
  980. X  .IR mail (1),
  981. X  and to examine colleagues appointment schedules.  Daily and weekly schedules
  982. X  can be sent to a \*(Ps printer.  Outdated appointments can be sent
  983. X! automatically to an archival file.  An extensive set of files containing
  984. X  commemorative dates is included, as well as a library of routines which
  985. X  computes the dates of various holidays which do not fall on fixed days
  986. X  of the Gregorian calendar (including religious holidays and astronomical
  987. X***************
  988. X*** 98,103
  989. X  .I calentool
  990. X  you should be operating within the SunView environment, the
  991. X  .BR \-m ,
  992. X  .B \-p
  993. X  and
  994. X  .B \-P
  995. X
  996. X--- 125,131 -----
  997. X  .I calentool
  998. X  you should be operating within the SunView environment, the
  999. X  .BR \-m ,
  1000. X+ .BR \-M ,
  1001. X  .B \-p
  1002. X  and
  1003. X  .B \-P
  1004. X***************
  1005. X*** 121,127
  1006. X  .SH OPTIONS
  1007. X  .I Calentool
  1008. X  accepts standard
  1009. X! .I suntools
  1010. X  command line options at the end of the command line.
  1011. X  .TP 15
  1012. X  .B \-b
  1013. X
  1014. X--- 149,155 -----
  1015. X  .SH OPTIONS
  1016. X  .I Calentool
  1017. X  accepts standard
  1018. X! .I sunview
  1019. X  command line options at the end of the command line.
  1020. X  .TP 15
  1021. X  .B \-b
  1022. X***************
  1023. X*** 133,138
  1024. X  .IR nlock (1L);
  1025. X  notifying passers-by of the user's current activity.
  1026. X  .TP
  1027. X  .BI \-d \ date
  1028. X  Open the calendar at the day
  1029. X  .IR date ,
  1030. X
  1031. X--- 161,174 -----
  1032. X  .IR nlock (1L);
  1033. X  notifying passers-by of the user's current activity.
  1034. X  .TP
  1035. X+ .B \-B
  1036. X+ Similar to
  1037. X+ .B \-b
  1038. X+ except that the
  1039. X+ .I calentool
  1040. X+ frame is opened instead of writing to the console.  If both features are
  1041. X+ desired, both options may be specified.
  1042. X+ .TP
  1043. X  .BI \-d \ date
  1044. X  Open the calendar at the day
  1045. X  .IR date ,
  1046. X***************
  1047. X*** 148,153
  1048. X  MO/DD (day DD of month MO, for example 11/12 for November 12)
  1049. X  .br
  1050. X  MO/DD/YY (day DD of month MO, year YY, for example 9/1/88 for 1 September 1988)
  1051. X  .RE
  1052. X  .TP
  1053. X  .BI \-f \ apptsfile
  1054. X
  1055. X--- 184,194 -----
  1056. X  MO/DD (day DD of month MO, for example 11/12 for November 12)
  1057. X  .br
  1058. X  MO/DD/YY (day DD of month MO, year YY, for example 9/1/88 for 1 September 1988)
  1059. X+ .TP
  1060. X+ relative dates:
  1061. X+ +n (n days from now, for example +1 for tomorrow)
  1062. X+ .br
  1063. X+ -n (n days ago, for example -1 for yesterday)
  1064. X  .RE
  1065. X  .TP
  1066. X  .BI \-f \ apptsfile
  1067. X***************
  1068. X*** 217,222
  1069. X  represents the last two digits of a past year).
  1070. X  .TP
  1071. X  .BI \-m " userid"
  1072. X  Send mail listing todays appointments to the user specified by
  1073. X  .I userid
  1074. X  and exit.
  1075. X
  1076. X--- 258,265 -----
  1077. X  represents the last two digits of a past year).
  1078. X  .TP
  1079. X  .BI \-m " userid"
  1080. X+ .br
  1081. X+ .BI \-M " userid"
  1082. X  Send mail listing todays appointments to the user specified by
  1083. X  .I userid
  1084. X  and exit.
  1085. X***************
  1086. X*** 220,225
  1087. X  Send mail listing todays appointments to the user specified by
  1088. X  .I userid
  1089. X  and exit.
  1090. X  This feature is useful when calentool is run from
  1091. X  .IR cron (1),
  1092. X  to send yourself mail about today's appointments.  No mail is
  1093. X
  1094. X--- 263,272 -----
  1095. X  Send mail listing todays appointments to the user specified by
  1096. X  .I userid
  1097. X  and exit.
  1098. X+ .B \-m
  1099. X+ shows all notes, while
  1100. X+ .B \-M
  1101. X+ does not show notes not marked for display in the month/year displays.
  1102. X  This feature is useful when calentool is run from
  1103. X  .IR cron (1),
  1104. X  to send yourself mail about today's appointments.  No mail is
  1105. X***************
  1106. X*** 224,229
  1107. X  .IR cron (1),
  1108. X  to send yourself mail about today's appointments.  No mail is
  1109. X  sent about today's appointments, if there are none.
  1110. X  (Note: this option eliminates the need for the separate program,
  1111. X  .IR calenmail (1L),
  1112. X  which was distributed with earlier releases of
  1113. X
  1114. X--- 271,286 -----
  1115. X  .IR cron (1),
  1116. X  to send yourself mail about today's appointments.  No mail is
  1117. X  sent about today's appointments, if there are none.
  1118. X+ The
  1119. X+ .B \-p
  1120. X+ and
  1121. X+ .B \-P
  1122. X+ options may be used with these options to mail yourself a whole weeks
  1123. X+ worth of appointments, e.g.:
  1124. X+ .I
  1125. X+ calentool -Pw -m billr.
  1126. X+ .R
  1127. X+ 
  1128. X  (Note: this option eliminates the need for the separate program,
  1129. X  .IR calenmail (1L),
  1130. X  which was distributed with earlier releases of
  1131. X***************
  1132. X*** 281,288
  1133. X  seconds.
  1134. X  .TP
  1135. X  .B \-w
  1136. X! Don't display the "Working!" message in the control panel during
  1137. X! lengthy operations.  The cursor still changes to an hourglass.
  1138. X  .TP
  1139. X  .B \-z
  1140. X  Convert appointments file used by earlier versions of
  1141. X
  1142. X--- 338,345 -----
  1143. X  seconds.
  1144. X  .TP
  1145. X  .B \-w
  1146. X! Display the "Working!" message in the control panel during
  1147. X! lengthy operations.  The cursor also changes to an hourglass.
  1148. X  .TP
  1149. X  .BI \-x " int"
  1150. X  Expire appointment files entries if they are older than
  1151. X***************
  1152. X*** 284,289
  1153. X  Don't display the "Working!" message in the control panel during
  1154. X  lengthy operations.  The cursor still changes to an hourglass.
  1155. X  .TP
  1156. X  .B \-z
  1157. X  Convert appointments file used by earlier versions of
  1158. X  .I calentool
  1159. X
  1160. X--- 341,354 -----
  1161. X  Display the "Working!" message in the control panel during
  1162. X  lengthy operations.  The cursor also changes to an hourglass.
  1163. X  .TP
  1164. X+ .BI \-x " int"
  1165. X+ Expire appointment files entries if they are older than
  1166. X+ .I int
  1167. X+ days old.  Appointments in #include files are not expired.  To expire
  1168. X+ included appointments,
  1169. X+ .I calentool
  1170. X+ must be run on the included file directly.
  1171. X+ .TP
  1172. X  .B \-z
  1173. X  Convert appointments file used by earlier versions of
  1174. X  .I calentool
  1175. X***************
  1176. X*** 293,299
  1177. X  .TP
  1178. X  .B \-5
  1179. X  Display only five days (Monday through Friday) in the week display.  This is
  1180. X! useful if the installer has set the default display format to 7 days.
  1181. X  .TP
  1182. X  .B \-7
  1183. X  Display all seven days in the week display.  This is useful if the installer
  1184. X
  1185. X--- 358,364 -----
  1186. X  .TP
  1187. X  .B \-5
  1188. X  Display only five days (Monday through Friday) in the week display.  This is
  1189. X! useful if the installer has set the default display format to 6 or 7 days.
  1190. X  .TP
  1191. X  .B \-6
  1192. X  Display six days (Monday through Saturday) in the week display.  This is
  1193. X***************
  1194. X*** 295,300
  1195. X  Display only five days (Monday through Friday) in the week display.  This is
  1196. X  useful if the installer has set the default display format to 7 days.
  1197. X  .TP
  1198. X  .B \-7
  1199. X  Display all seven days in the week display.  This is useful if the installer
  1200. X  has set the default value to 5 days.  The 7-day display is wider than the 5-day
  1201. X
  1202. X--- 360,369 -----
  1203. X  Display only five days (Monday through Friday) in the week display.  This is
  1204. X  useful if the installer has set the default display format to 6 or 7 days.
  1205. X  .TP
  1206. X+ .B \-6
  1207. X+ Display six days (Monday through Saturday) in the week display.  This is
  1208. X+ useful if the installer has set the default display format to 5 or 7 days.
  1209. X+ .TP
  1210. X  .B \-7
  1211. X  Display all seven days in the week display.  This is useful if the installer
  1212. X  has set the default value to 5 or 6 days.  The 7-day display is wider than the 5-day
  1213. X***************
  1214. X*** 297,303
  1215. X  .TP
  1216. X  .B \-7
  1217. X  Display all seven days in the week display.  This is useful if the installer
  1218. X! has set the default value to 5 days.  The 7-day display is wider than the 5-day
  1219. X  display, allowing longer messages to be displayed.
  1220. X  .SH "DETAILED INSTRUCTIONS"
  1221. X  .SS "Examining the calendar"
  1222. X
  1223. X--- 366,372 -----
  1224. X  .TP
  1225. X  .B \-7
  1226. X  Display all seven days in the week display.  This is useful if the installer
  1227. X! has set the default value to 5 or 6 days.  The 7-day display is wider than the 5-day
  1228. X  display, allowing longer messages to be displayed.
  1229. X  .TP
  1230. X  .B \-12
  1231. X***************
  1232. X*** 299,304
  1233. X  Display all seven days in the week display.  This is useful if the installer
  1234. X  has set the default value to 5 days.  The 7-day display is wider than the 5-day
  1235. X  display, allowing longer messages to be displayed.
  1236. X  .SH "DETAILED INSTRUCTIONS"
  1237. X  .SS "Examining the calendar"
  1238. X  When first opened, the tool displays the appointments for a single day (today
  1239. X
  1240. X--- 368,394 -----
  1241. X  Display all seven days in the week display.  This is useful if the installer
  1242. X  has set the default value to 5 or 6 days.  The 7-day display is wider than the 5-day
  1243. X  display, allowing longer messages to be displayed.
  1244. X+ .TP
  1245. X+ .B \-12
  1246. X+ Display time in a 12-hour AM/PM format whenever practical.  This is usefful
  1247. X+ if the installer has set the default time format to 24-hour time.
  1248. X+ .TP
  1249. X+ .B \-24
  1250. X+ Display time in a 24-hour AM/PM format.  This is usefful
  1251. X+ if the installer has set the default time format to 12-hour time.
  1252. X+ .TP
  1253. X+ .B \-e
  1254. X+ Set European week display format (Monday through Sunday).  When 7 day
  1255. X+ week display is set, the display shows the days Monday through Sunday,
  1256. X+ rather than Sunday through Saturday.  This also affects the month
  1257. X+ and year displays.
  1258. X+ .TP
  1259. X+ .B \-E
  1260. X+ Set all European style options.  Currently, this includes:
  1261. X+ .B \-24
  1262. X+ and
  1263. X+ .BR \-e .
  1264. X+ Other options may be added in the future.
  1265. X  .SH "DETAILED INSTRUCTIONS"
  1266. X  .SS "Examining the calendar"
  1267. X  When first opened, the tool displays the appointments for a single day (today
  1268. X***************
  1269. X*** 459,465
  1270. X  year.  Alternatively,
  1271. X  the appointment may be repeated at a specified interval of days.  The user can
  1272. X  also specify a period of days prior to the appointment for which a reminder
  1273. X! will be printed.  For example, one could specify that a meeting is to occur
  1274. X  on the first and third Tuesday of the month, in perpetuity, by selecting
  1275. X  the repeat options
  1276. X  .BR "Selected Week" ,
  1277. X
  1278. X--- 549,556 -----
  1279. X  year.  Alternatively,
  1280. X  the appointment may be repeated at a specified interval of days.  The user can
  1281. X  also specify a period of days prior to the appointment for which a reminder
  1282. X! will be printed and how many times this appointment will be repeated.
  1283. X! For example, one could specify that a meeting is to occur
  1284. X  on the first and third Tuesday of the month, in perpetuity, by selecting
  1285. X  the repeat options
  1286. X  .BR "Selected Week" ,
  1287. X***************
  1288. X*** 560,566
  1289. X      \fC# CalenTool V2 - DO NOT REMOVE THIS LINE
  1290. X      #include "file"
  1291. X      # <comment string>
  1292. X!     YY MO DD HH MI AA [II] <WW> # \fImessage\fP
  1293. X  .fi
  1294. X  .SS Header line
  1295. X  The first line in an
  1296. X
  1297. X--- 651,657 -----
  1298. X      \fC# CalenTool V2 - DO NOT REMOVE THIS LINE
  1299. X      #include "file"
  1300. X      # <comment string>
  1301. X!     YY MO DD HH MI AA [II] <WW> +RR # \fImessage\fP
  1302. X  .fi
  1303. X  .SS Header line
  1304. X  The first line in an
  1305. X***************
  1306. X*** 644,650
  1307. X  appointments.  The
  1308. X  .I <WW>
  1309. X  field appears within broken brackets, and indicates the number of
  1310. X! days of advance warning required.
  1311. X  .SS Appointment text
  1312. X  If a # character appears in front of the text, it indicates that a recurring
  1313. X  appointment has been suppressed for that day.
  1314. X
  1315. X--- 735,744 -----
  1316. X  appointments.  The
  1317. X  .I <WW>
  1318. X  field appears within broken brackets, and indicates the number of
  1319. X! days of advance warning required.  The
  1320. X! .I +RR
  1321. X! field is preceded by a plus sign, and indicates the repetition count
  1322. X! for a given appointment.
  1323. X  .SS Appointment text
  1324. X  If a # character appears in front of the text, it indicates that a recurring
  1325. X  appointment has been suppressed for that day.
  1326. X***************
  1327. X*** 660,666
  1328. X      \fC** 04 01 00 01 00            April Fool's Day
  1329. X      ** ** Tu 10 30 00 [1,3]      Meeting on 1st and 3rd Tues. of Month
  1330. X      ** ** 01 00 01 00 <1>        First day of every month, one day warning
  1331. X!     88 05 ** 00 01 00            On vacation for entire month of May 1988\fP
  1332. X  .fi
  1333. X  .RE
  1334. X  .SH "SUPPLIED SPECIAL DATES FILES"
  1335. X
  1336. X--- 754,761 -----
  1337. X      \fC** 04 01 00 01 00            April Fool's Day
  1338. X      ** ** Tu 10 30 00 [1,3]      Meeting on 1st and 3rd Tues. of Month
  1339. X      ** ** 01 00 01 00 <1>        First day of every month, one day warning
  1340. X!     88 05 ** 00 01 00            On vacation for entire month of May 1988
  1341. X!     89 11 06 99 00 00 +4         SigFishing Conference\fP
  1342. X  .fi
  1343. X  .RE
  1344. X  .SH "SUPPLIED SPECIAL DATES FILES"
  1345. X***************
  1346. X*** 779,785
  1347. X  .I $HOME/.defaults
  1348. X  file
  1349. X  .SH "SEE ALSO"
  1350. X! cal(1), cal2ct(1L), calendar(1), clocktool(1), cron(8),
  1351. X  mail(1), month(1L), monthtool(1L), month2ct(1L), mt2ct(1L),
  1352. X  nlock(1L), suntools(1), vi(1)
  1353. X  .SH REFERENCES
  1354. X
  1355. X--- 874,880 -----
  1356. X  .I $HOME/.defaults
  1357. X  file
  1358. X  .SH "SEE ALSO"
  1359. X! cal(1), cal2ct(1L), calencheck(1L), calendar(1), clocktool(1), cron(8),
  1360. X  mail(1), month(1L), monthtool(1L), month2ct(1L), mt2ct(1L),
  1361. X  nlock(1L), suntools(1)
  1362. X  .SH REFERENCES
  1363. X***************
  1364. X*** 781,787
  1365. X  .SH "SEE ALSO"
  1366. X  cal(1), cal2ct(1L), calendar(1), clocktool(1), cron(8),
  1367. X  mail(1), month(1L), monthtool(1L), month2ct(1L), mt2ct(1L),
  1368. X! nlock(1L), suntools(1), vi(1)
  1369. X  .SH REFERENCES
  1370. X  An excellent compendium which describes basic terminology of time measurement,
  1371. X  methods of astronomical computation, and the convoluted history of calendars:
  1372. X
  1373. X--- 876,882 -----
  1374. X  .SH "SEE ALSO"
  1375. X  cal(1), cal2ct(1L), calencheck(1L), calendar(1), clocktool(1), cron(8),
  1376. X  mail(1), month(1L), monthtool(1L), month2ct(1L), mt2ct(1L),
  1377. X! nlock(1L), suntools(1)
  1378. X  .SH REFERENCES
  1379. X  An excellent compendium which describes basic terminology of time measurement,
  1380. X  methods of astronomical computation, and the convoluted history of calendars:
  1381. X*** /tmp/,RCSt1a17008    Fri Dec 15 17:24:08 1989
  1382. X--- wpaint.c    Fri Dec 15 17:18:42 1989
  1383. X***************
  1384. X*** 1,5
  1385. X  /*
  1386. X!  * $Header: wpaint.c,v 2.2 89/07/19 20:32:38 billr Exp $
  1387. X   */
  1388. X  /*
  1389. X   * wpaint.c
  1390. X
  1391. X--- 1,5 -----
  1392. X  /*
  1393. X!  * $Header: wpaint.c,v 2.3 89/12/15 17:18:39 billr Exp $
  1394. X   */
  1395. X  /*
  1396. X   * wpaint.c
  1397. X***************
  1398. X*** 54,59
  1399. X      fix_current_day();
  1400. X      Save = current;
  1401. X      current.tm_mday -= current.tm_wday; /* Sunday of this week */
  1402. X      fix_current_day();
  1403. X      if (nr_weekdays < 7) {
  1404. X          current.tm_mday++;
  1405. X
  1406. X--- 54,65 -----
  1407. X      fix_current_day();
  1408. X      Save = current;
  1409. X      current.tm_mday -= current.tm_wday; /* Sunday of this week */
  1410. X+     if (monday_first)  {
  1411. X+         if (current.tm_wday == SUN)
  1412. X+             current.tm_mday -= 7;
  1413. X+         if (nr_weekdays == 7)
  1414. X+             current.tm_mday++; /* start on Monday */
  1415. X+     }
  1416. X      fix_current_day();
  1417. X      if (nr_weekdays < 7) {
  1418. X          current.tm_mday++;
  1419. X***************
  1420. X*** 127,133
  1421. X          c[3] = '\0';            /* Mon Tue Wed Thu Fri */
  1422. X          for (i=0; i<nr_weekdays; i++) {
  1423. X                  x = startx + i*weekslot_width + (weekslot_width - 2*(font->pf_defaultsize.x+2))/2;
  1424. X!         sprintf(c, "%3.3s", daynames[First.tm_wday + i]);
  1425. X                  pw_text(main_pixwin, x, starty-5, PIX_SRC, font, c);
  1426. X          }
  1427. X          
  1428. X
  1429. X--- 133,142 -----
  1430. X          c[3] = '\0';            /* Mon Tue Wed Thu Fri */
  1431. X          for (i=0; i<nr_weekdays; i++) {
  1432. X                  x = startx + i*weekslot_width + (weekslot_width - 2*(font->pf_defaultsize.x+2))/2;
  1433. X!         if (monday_first && i == 6)
  1434. X!             sprintf(c, "%3.3s", daynames[SUN]);
  1435. X!         else
  1436. X!             sprintf(c, "%3.3s", daynames[First.tm_wday + i]);
  1437. X                  pw_text(main_pixwin, x, starty-5, PIX_SRC, font, c);
  1438. X          }
  1439. X          
  1440. X***************
  1441. X*** 135,143
  1442. X          rightx = startx + nr_weekdays*weekslot_width + 10;
  1443. X      for (i=0; i<N_SLOTS; i++) {
  1444. X          if (i < n_tslots) {
  1445. X!             sprintf(c, "%2d:%s",
  1446. X!                 (START_HOUR+(i/2))%12 == 0 ? 12 : (START_HOUR+(i/2))%12,
  1447. X!                 i%2 == 0 ? "00" : "30");
  1448. X          } else if (i == n_tslots) {
  1449. X              sprintf(c, "Notes");
  1450. X          } else {
  1451. X
  1452. X--- 144,157 -----
  1453. X          rightx = startx + nr_weekdays*weekslot_width + 10;
  1454. X      for (i=0; i<N_SLOTS; i++) {
  1455. X          if (i < n_tslots) {
  1456. X!             if (hour24)
  1457. X!                 sprintf(c, "%2d:%s",
  1458. X!                     START_HOUR+(i/2),
  1459. X!                     i%2 == 0 ? "00" : "30");
  1460. X!             else
  1461. X!                 sprintf(c, "%2d:%s%s",
  1462. X!                     (START_HOUR+(i/2))%12 == 0 ? 12 : (START_HOUR+(i/2))%12,
  1463. X!                     i%2 == 0 ? "00" : "30", (START_HOUR+(i/2) < 12 ? "am" : "pm"));
  1464. X          } else if (i == n_tslots) {
  1465. X              sprintf(c, (hour24 ? "Notes" : " Notes"));
  1466. X          } else {
  1467. X***************
  1468. X*** 139,145
  1469. X                  (START_HOUR+(i/2))%12 == 0 ? 12 : (START_HOUR+(i/2))%12,
  1470. X                  i%2 == 0 ? "00" : "30");
  1471. X          } else if (i == n_tslots) {
  1472. X!             sprintf(c, "Notes");
  1473. X          } else {
  1474. X              sprintf(c, "     ");
  1475. X          }
  1476. X
  1477. X--- 153,159 -----
  1478. X                      (START_HOUR+(i/2))%12 == 0 ? 12 : (START_HOUR+(i/2))%12,
  1479. X                      i%2 == 0 ? "00" : "30", (START_HOUR+(i/2) < 12 ? "am" : "pm"));
  1480. X          } else if (i == n_tslots) {
  1481. X!             sprintf(c, (hour24 ? "Notes" : " Notes"));
  1482. X          } else {
  1483. X              sprintf(c, "     ");
  1484. X          }
  1485. X***************
  1486. X*** 143,150
  1487. X          } else {
  1488. X              sprintf(c, "     ");
  1489. X          }
  1490. X!                 pw_text(main_pixwin, startx-6*font->pf_defaultsize.x, y, PIX_SRC, font, c);
  1491. X!                 pw_text(main_pixwin, rightx, y, PIX_SRC, font, c);
  1492. X                  y += weekslot_height;
  1493. X      }
  1494. X  
  1495. X
  1496. X--- 157,169 -----
  1497. X          } else {
  1498. X              sprintf(c, "     ");
  1499. X          }
  1500. X!         if (hour24) {
  1501. X!             pw_text(main_pixwin, startx-7*font->pf_defaultsize.x, y, PIX_SRC, font, c);
  1502. X!             pw_text(main_pixwin, rightx, y, PIX_SRC, font, c);
  1503. X!         } else {
  1504. X!             pw_text(main_pixwin, startx-8*font->pf_defaultsize.x, y, PIX_SRC, font, c);
  1505. X!             pw_text(main_pixwin, rightx-font->pf_defaultsize.x, y, PIX_SRC, font, c);
  1506. X!         }
  1507. X                  y += weekslot_height;
  1508. X      }
  1509. X  
  1510. X***************
  1511. X*** 155,162
  1512. X  
  1513. X      /* display week dates (month, day) */
  1514. X          for (i=0; i<nr_weekdays; i++) {
  1515. X!         sprintf(c, "%3.3s %2d",
  1516. X!             monthnames[current.tm_mon], current.tm_mday);
  1517. X          pw_text(main_pixwin, x, y, PIX_SRC, font, c);
  1518. X                  x += weekslot_width;
  1519. X          current.tm_mday++;
  1520. X
  1521. X--- 174,185 -----
  1522. X  
  1523. X      /* display week dates (month, day) */
  1524. X          for (i=0; i<nr_weekdays; i++) {
  1525. X!         if (day_first)
  1526. X!             sprintf(c, "%2d %3.3s",
  1527. X!                 current.tm_mday, monthnames[current.tm_mon]);
  1528. X!         else
  1529. X!             sprintf(c, "%3.3s %2d",
  1530. X!                 monthnames[current.tm_mon], current.tm_mday);
  1531. X          pw_text(main_pixwin, x, y, PIX_SRC, font, c);
  1532. X                  x += weekslot_width;
  1533. X          current.tm_mday++;
  1534. X*** /tmp/,RCSt1a17013    Fri Dec 15 17:24:12 1989
  1535. X--- ypaint.c    Fri Dec 15 17:18:46 1989
  1536. X***************
  1537. X*** 1,5
  1538. X  /*
  1539. X!  * $Header: ypaint.c,v 2.1 89/05/09 14:20:15 billr Exp $
  1540. X   */
  1541. X  /*
  1542. X   * ypaint.c
  1543. X
  1544. X--- 1,5 -----
  1545. X  /*
  1546. X!  * $Header: ypaint.c,v 2.2 89/12/15 17:18:43 billr Exp $
  1547. X   */
  1548. X  /*
  1549. X   * ypaint.c
  1550. X***************
  1551. X*** 40,45
  1552. X      struct appt_entry appt;
  1553. X      int read_stat;
  1554. X      FILE *apts;
  1555. X  
  1556. X      lock_cursors();
  1557. X      /* destory future appts popup, if it exists */
  1558. X
  1559. X--- 40,46 -----
  1560. X      struct appt_entry appt;
  1561. X      int read_stat;
  1562. X      FILE *apts;
  1563. X+     int runl;
  1564. X  
  1565. X      lock_cursors();
  1566. X      /* destory future appts popup, if it exists */
  1567. X***************
  1568. X*** 75,81
  1569. X          err_rpt("can't open appointments file", FATAL);
  1570. X  
  1571. X      working(FALSE);
  1572. X!     while ((read_stat = get_aentry(apts, &appt)) != EOF) {
  1573. X          if (read_stat)
  1574. X              continue;    /* read error */
  1575. X          if (appt.flags & A_COMMENT)
  1576. X
  1577. X--- 76,82 -----
  1578. X          err_rpt("can't open appointments file", FATAL);
  1579. X  
  1580. X      working(FALSE);
  1581. X!     while ((read_stat = get_aentry(apts, &appt, FALSE)) != EOF) {
  1582. X          if (read_stat)
  1583. X              continue;    /* read error */
  1584. X          if (appt.flags & A_COMMENT)
  1585. X***************
  1586. X*** 130,139
  1587. X                      }
  1588. X                  } else {
  1589. X                      fix_current_day();
  1590. X!                     while (ymd_compare(current, Last) <= 0) {
  1591. X!                         busy_today[current.tm_yday]++;
  1592. X!                         current.tm_mday += appt.repeat;
  1593. X!                         fix_current_day();
  1594. X                      }
  1595. X                  }
  1596. X              } else {
  1597. X
  1598. X--- 131,148 -----
  1599. X                      }
  1600. X                  } else {
  1601. X                      fix_current_day();
  1602. X!                     if (appt.flags & RUN)
  1603. X!                         runl = appt.runlength;
  1604. X!                     else
  1605. X!                         runl = 1;
  1606. X!                     while (ymd_compare(current, Last) <= 0 && runl) {
  1607. X!                         if (runl) {
  1608. X!                             busy_today[current.tm_yday]++;
  1609. X!                             current.tm_mday += appt.repeat;
  1610. X!                             fix_current_day();
  1611. X!                             if (appt.flags & RUN)
  1612. X!                                 --runl;
  1613. X!                         }
  1614. X                      }
  1615. X                  }
  1616. X              } else {
  1617. X***************
  1618. X*** 145,153
  1619. X              }
  1620. X          } else if ((appt.flags & REPEAT) && !(appt.flags & EVERY_SOMEDAY)) {
  1621. X              /* find 1st appt in this year */
  1622. X!             while (ymd_compare(current, First) < 0) {
  1623. X!                 current.tm_mday += appt.repeat;
  1624. X!                 fix_current_day();
  1625. X              }
  1626. X              while (ymd_compare(current, Last) <= 0) {
  1627. X                  busy_today[current.tm_yday]++;
  1628. X
  1629. X--- 154,170 -----
  1630. X              }
  1631. X          } else if ((appt.flags & REPEAT) && !(appt.flags & EVERY_SOMEDAY)) {
  1632. X              /* find 1st appt in this year */
  1633. X!             if (appt.flags & RUN)
  1634. X!                 runl = appt.runlength;
  1635. X!             else
  1636. X!                 runl = 1;
  1637. X!             while (ymd_compare(current, First) < 0 && runl) {
  1638. X!                 if (appt.flags & RUN)
  1639. X!                     --runl;
  1640. X!                 if (runl) {
  1641. X!                     current.tm_mday += appt.repeat;
  1642. X!                     fix_current_day();
  1643. X!                 }
  1644. X              }
  1645. X              while (ymd_compare(current, Last) <= 0 && runl) {
  1646. X                  if (runl) {
  1647. X***************
  1648. X*** 149,158
  1649. X                  current.tm_mday += appt.repeat;
  1650. X                  fix_current_day();
  1651. X              }
  1652. X!             while (ymd_compare(current, Last) <= 0) {
  1653. X!                 busy_today[current.tm_yday]++;
  1654. X!                 current.tm_mday += appt.repeat;
  1655. X!                 fix_current_day();
  1656. X              }
  1657. X          }
  1658. X  
  1659. X
  1660. X--- 166,179 -----
  1661. X                      fix_current_day();
  1662. X                  }
  1663. X              }
  1664. X!             while (ymd_compare(current, Last) <= 0 && runl) {
  1665. X!                 if (runl) {
  1666. X!                     busy_today[current.tm_yday]++;
  1667. X!                     current.tm_mday += appt.repeat;
  1668. X!                     fix_current_day();
  1669. X!                     if (appt.flags & RUN)
  1670. X!                         --runl;
  1671. X!                 }
  1672. X              }
  1673. X          }
  1674. X  
  1675. X***************
  1676. X*** 194,202
  1677. X        PIX_SRC, bigfont, title);
  1678. X  
  1679. X      /* display day names */
  1680. X!     strcpy(buf, "Su Mo Tu We Th Fr Sa    ");
  1681. X!     strcat(buf, "Su Mo Tu We Th Fr Sa    ");
  1682. X!     strcat(buf, "Su Mo Tu We Th Fr Sa");
  1683. X      pw_text(main_pixwin, startx+4, starty-2, PIX_SRC, font, buf);
  1684. X  
  1685. X      /* draw months */
  1686. X
  1687. X--- 215,229 -----
  1688. X        PIX_SRC, bigfont, title);
  1689. X  
  1690. X      /* display day names */
  1691. X!     if (monday_first) {
  1692. X!         strcpy(buf, "Mo Tu We Th Fr Sa Su    ");
  1693. X!         strcat(buf, "Mo Tu We Th Fr Sa Su    ");
  1694. X!         strcat(buf, "Mo Tu We Th Fr Sa Su");
  1695. X!     } else {
  1696. X!         strcpy(buf, "Su Mo Tu We Th Fr Sa    ");
  1697. X!         strcat(buf, "Su Mo Tu We Th Fr Sa    ");
  1698. X!         strcat(buf, "Su Mo Tu We Th Fr Sa");
  1699. X!     }
  1700. X      pw_text(main_pixwin, startx+4, starty-2, PIX_SRC, font, buf);
  1701. X  
  1702. X      /* draw months */
  1703. X***************
  1704. X*** 203,209
  1705. X      monthnr = 0;
  1706. X      yrday = 0;
  1707. X      extra_days = 0;
  1708. X!     startbox = First.tm_wday;
  1709. X      for (row=0; row<4; row++) {
  1710. X          for (col=0; col<3; col++) {
  1711. X              x = startx + 8*ybox_width*col;
  1712. X
  1713. X--- 230,242 -----
  1714. X      monthnr = 0;
  1715. X      yrday = 0;
  1716. X      extra_days = 0;
  1717. X!     if (monday_first) {
  1718. X!         if (First.tm_wday == SUN)
  1719. X!             startbox = 6;
  1720. X!         else
  1721. X!             startbox = First.tm_wday - 1;
  1722. X!     } else
  1723. X!         startbox = First.tm_wday;
  1724. X      for (row=0; row<4; row++) {
  1725. X          for (col=0; col<3; col++) {
  1726. X              x = startx + 8*ybox_width*col;
  1727. END_OF_FILE
  1728. if test 44652 -ne `wc -c <'patches05a'`; then
  1729.     echo shar: \"'patches05a'\" unpacked with wrong size!
  1730. fi
  1731. # end of 'patches05a'
  1732. fi
  1733. echo shar: End of archive 1 \(of 4\).
  1734. cp /dev/null ark1isdone
  1735. MISSING=""
  1736. for I in 1 2 3 4 ; do
  1737.     if test ! -f ark${I}isdone ; then
  1738.     MISSING="${MISSING} ${I}"
  1739.     fi
  1740. done
  1741. if test "${MISSING}" = "" ; then
  1742.     echo You have unpacked all 4 archives.
  1743.     rm -f ark[1-9]isdone
  1744. else
  1745.     echo You still need to unpack the following archives:
  1746.     echo "        " ${MISSING}
  1747. fi
  1748. ##  End of shell archive.
  1749. exit 0
  1750.  
  1751.